import { message } from 'antd'

const Message = (type: string, text: string) => {
    switch (type) {
        case 'success':
            message.success({
                content: text,
                style: {
                    marginTop: '80vh'
                }
            }); return
        case 'error':
            message.error({
                content: text,
                style: {
                    marginTop: '80vh'
                }
            }); return
        case 'warning':
            message.warning({
                content: text,
                style: {
                    marginTop: '80vh'
                }
            }); return
        case 'info':
            message.info({
                content: text,
                style: {
                    marginTop: '80vh'
                }
            }); return
    }
}

export default Message